/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author jose
 */
@Entity
@Table(name = "jefe_division")
@NamedQueries({
    @NamedQuery(name = "JefeDivision.findAll", query = "SELECT j FROM JefeDivision j"),
    @NamedQuery(name = "JefeDivision.findByNoControl", query = "SELECT j FROM JefeDivision j WHERE j.noControl = :noControl"),
    @NamedQuery(name = "JefeDivision.findByNombre", query = "SELECT j FROM JefeDivision j WHERE j.nombre = :nombre"),
    @NamedQuery(name = "JefeDivision.findByApellidop", query = "SELECT j FROM JefeDivision j WHERE j.apellidop = :apellidop"),
    @NamedQuery(name = "JefeDivision.findByApellidom", query = "SELECT j FROM JefeDivision j WHERE j.apellidom = :apellidom"),
    @NamedQuery(name = "JefeDivision.findByAñoIngreso", query = "SELECT j FROM JefeDivision j WHERE j.añoIngreso = :añoIngreso")})
public class JefeDivision implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "no_control")
    private Integer noControl;
    @Basic(optional = false)
    @Column(name = "Nombre")
    private String nombre;
    @Basic(optional = false)
    @Column(name = "apellidop")
    private String apellidop;
    @Basic(optional = false)
    @Column(name = "apellidom")
    private String apellidom;
    @Basic(optional = false)
    @Column(name = "año_ingreso")
    private int añoIngreso;

    public JefeDivision() {
    }

    public JefeDivision(Integer noControl) {
        this.noControl = noControl;
    }

    public JefeDivision(Integer noControl, String nombre, String apellidop, String apellidom, int añoIngreso) {
        this.noControl = noControl;
        this.nombre = nombre;
        this.apellidop = apellidop;
        this.apellidom = apellidom;
        this.añoIngreso = añoIngreso;
    }

    public Integer getNoControl() {
        return noControl;
    }

    public void setNoControl(Integer noControl) {
        this.noControl = noControl;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getApellidop() {
        return apellidop;
    }

    public void setApellidop(String apellidop) {
        this.apellidop = apellidop;
    }

    public String getApellidom() {
        return apellidom;
    }

    public void setApellidom(String apellidom) {
        this.apellidom = apellidom;
    }

    public int getAñoIngreso() {
        return añoIngreso;
    }

    public void setAñoIngreso(int añoIngreso) {
        this.añoIngreso = añoIngreso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (noControl != null ? noControl.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof JefeDivision)) {
            return false;
        }
        JefeDivision other = (JefeDivision) object;
        if ((this.noControl == null && other.noControl != null) || (this.noControl != null && !this.noControl.equals(other.noControl))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Model.JefeDivision[noControl=" + noControl + "]";
    }

}
